﻿<div ng-controller="appController">
	<header class="navbar navbar-static-top ms-header" role="banner">
		<div class="container">
			<div class="navbar-header">
				<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false">
					<i class="fa fa-list"></i>
				</button>
				<button class="navbar-toggle collapsed" type="button" data-toggle="collapse" data-target="#bs-aside" aria-controls="bs-aside" aria-expanded="false">
					<i class="fa fa-sliders"></i>
				</button>
				<a href="/admin" class="navbar-brand" style="padding:5px 0 0"><img ng-src="{{site.img_url+site.logo}}" ng-show="site.logo" width="40" height="40" /></a>
			</div>
			<nav id="bs-navbar" class="collapse navbar-collapse">
				<ul class="nav navbar-nav">
					<li ng-repeat="x in layout_menus" ng-class="{active:$state.includes(x.url)}">
						<a ng-click="jump(x)" ui-sref="{{open_frist(x.url ? x.url : 'app')}}">{{x.name}}</a>
					</li>
				</ul>
				<ul class="nav navbar-nav navbar-right dropdown">
					<li>
						<a data-toggle="dropdown" class="dropdown-toggle" href="javascript:void(0);" style="padding:5px;">
							<span class="clear">
								<span class="block m-t-xs">
									<img ng-src="{{ currentUser.photo|thumbnail:40:40:site.img_url }}" class="img-circle" ng-show="currentUser.photo">
									<strong class="font-bold">{{ currentUser.nick }}</strong>
								</span>
								<span class="text-muted text-xs block">{{ currentUser.role_name }} <b class="caret"></b></span>
							</span>
						</a>
						<ul class="dropdown-menu">
							<li><a ui-sref="app.account.profile" ng-click="account()">我的资料</a></li>
							<li><a ui-sref="app.account.change_pwd" ng-click="account()">修改密码</a></li>
							<li class="divider"></li>
							<li><a href="javascript:void(0);" ng-click="logout()">安全退出</a></li>
						</ul>
					</li>
				</ul>
			</nav>
		</div>
	</header>
	<div class="container ms-container" style="padding:0;">
		<div class="row">
			<div class="col-md-2" role="complementary">
				<div class="ms-sidebar collapse navbar-collapse" id="bs-aside">
					<ul class="nav ms-sidenav" ng-repeat="x in current.children">
						<li ng-class="{active:$state.includes(current.url)}">
							<h5>{{x.name}}</h5>
							<ul class="nav">
								<li ui-sref-active="active" ng-repeat="y in x.children">
									<a ui-sref="{{y.url?y.url:'app'}}"><i ng-if="y.icon" class="fa" ng-class="y.icon"></i> {{y.name}}</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
			</div>
			<div class="col-md-10" ui-view></div>
		</div>
	</div>
</div>